package com.woniuxy.dao;

import com.woniuxy.entity.Course;
import com.woniuxy.entity.ResponseEntity;
import com.woniuxy.entity.Training;
import org.apache.ibatis.annotations.Param;
import com.woniuxy.entity.User;

import java.util.List;

public interface TrainingsDao {
    /**
     * Auther: gaoyi  <br/>
     * Date: 2022/3/7:16:02  <br/>
     * Description:查询培训项目
     */
    List<Training> findTraining(Training training);

    /**
     * Auther: gaoyi  <br/>
     * Date: 2022/3/7:19:05  <br/>
     * Description:删除培训项目
     */
    int deleteById(int id);

    /**
     * Auther: gaoyi  <br/>
     * Date: 2022/3/7:19:10  <br/>
     * Description:添加培训项目
     */
    int addOne(Training training);

    /**
     * Auther: gaoyi  <br/>
     * Date: 2022/3/7:19:25  <br/>
     * Description:修改培训项目
     */
    int updateById(Training training);



    /**
     * Auther: gaoyi  <br/>
     * Date: 2022/3/9:19:30  <br/>
     * Description:通过trainingId查询crouseId
     */
    List<Integer> findCrouseIdBytrainingId(Training training);

/***
 * @description:
 * @author 冯浩波
 * @date  2022/3/10 19:43
 */
    int addCourseid(@Param("courseid") int courseid,@Param("trainingid") int trainingid);

    /*
     * Description :通过用户id查询user_training中间表查询培训
     * ChangeLog : 1. 创建 (2022/3/11 1:32 [10604]);
     ** @param null
     * *  @return null
    */
    List<Integer> findTrainingByUserId(User user);

    List<Integer> findIds(int id);

    Training findT(Integer tid);


    Training find(@Param("id") Integer id, @Param("trainingname") String trainingname,@Param("status") String status);

    Integer findTrainingIdByCrouseId(int id);

    List<Training> findNotApplyTrainingByUserId(int userid);
}
